/**
 *消息展示 Activity 
 */
package com.example.jumpnote.android;

import android.app.Activity;
import android.app.NotificationManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

/**
 * @author kevin
 * 
 */
public class DisplayMessage extends Activity {
	private NotificationManager notificationManager;
	private static final String TAG = "DisplayMessageActivity";  
	public DisplayMessage() {
	}

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.displaymessage);
		notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
		TextView textView = (TextView) findViewById(R.id.display_textView);
		String message = getIntent().getStringExtra("weather");
		notificationManager
				.cancel(getIntent().getIntExtra("notificationID", 0));
		textView.setText(message);
		Log.e(TAG, "create onCreate...");
	}

	@Override
	protected void onStart() {
		super.onStart();
		Log.e(TAG, "start onStart~~~");
	}

	@Override
	protected void onRestart() {
		super.onRestart();
		Log.e(TAG, "start onRestart~~~"+getIntent().getStringExtra("weather"));
	}

	@Override
	protected void onResume() {
		super.onResume();
		Log.e(TAG, "start onResume~~~"+getIntent().getStringExtra("weather"));
	}

	@Override
	protected void onPause() {
		super.onPause();
		Log.e(TAG, "start onPause~~~");
	}

	@Override
	protected void onStop() {
		super.onStop();
		Log.e(TAG, "start onStop~~~");
		getIntent().removeExtra("weather");
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		getIntent().removeExtra("weather");
		Log.e(TAG, "start onDestroy~~~");
	}

}
